home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / vtcl / doc / RecordEval.3 < prev    next >
Encoding:
Text File  |  1995-07-10  |  2.7 KB  |  68 lines

  1. '\"
  2. '\" Copyright (c) 1989-1993 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/tcl/man/RCS/RecordEval.3,v 1.9 93/04/16 15:02:27 ouster Exp $ SPRITE (Berkeley)
  22. '\" 
  23. '\"----------------------------------------------------------------------------
  24. '\"    @(#) RecordEval.3 26.1 93/10/22 SCOINC
  25. '\"
  26. '\"     Copyright (C) The Santa Cruz Operation, 1992-1993.
  27. '\"     This Module contains Proprietary Information of
  28. '\"    The Santa Cruz Operation, and should be treated as Confidential.
  29. '\"----------------------------------------------------------------------------
  30. .so ../man.macros
  31. .HS Tcl_RecordAndEval tclc
  32. .BS
  33. .SH NAME
  34. Tcl_RecordAndEval \- save command on history list before evaluating
  35. .SH SYNOPSIS
  36. .nf
  37. \fB#include <tcl.h>\fR
  38. .sp
  39. int
  40. \fBTcl_RecordAndEval\fR(\fIinterp, cmd, eval\fR)
  41. .SH ARGUMENTS
  42. .AS Tcl_Interp *interp;
  43. .AP Tcl_Interp *interp in
  44. Tcl interpreter in which to evaluate command.
  45. .AP char *cmd in
  46. Command (or sequence of commands) to execute.
  47. .AP int eval in
  48. 0 means evaluate \fIcmd\fR, TCL_NO_EVAL means record it but don't
  49. evaluate it.
  50. .BE
  51.  
  52. .SH DESCRIPTION
  53. .PP
  54. \fBTcl_RecordAndEval\fR is invoked to record a command as an event
  55. on the history list and then execute it.
  56. It returns a completion code such as TCL_OK just like \fBTcl_Eval\fR
  57. and it leaves information in \fIinterp->result\fR.
  58. If you don't want the command recorded on the history list then
  59. you should invoke \fBTcl_Eval\fR instead of \fBTcl_RecordAndEval\fR.
  60. Normally \fBTcl_RecordAndEval\fR is only called with top-level
  61. commands typed by the user, since the purpose of history is to
  62. allow the user to re-issue recently-invoked commands.
  63. If the \fIeval\fR argument is TCL_NO_EVAL then the command is
  64. recorded without being evaluated.
  65.  
  66. .SH KEYWORDS
  67. command, event, execute, history, interpreter, record
  68.